class Post < ActiveRecord::Base
  belongs_to :user, :counter_cache => true
  has_many :comments, :dependent => :destroy
  has_many :direct_comments, :class_name => "Comment", :conditions => { :parent_id => nil }
  acts_as_voteable  
  def posted
    self.created_at.strftime("%d %B %Y в %H:%M")
  end
end
